package br.com.ceped.modelo;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;


@Entity(name = "tbl_usuario")
public class Usuario implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "matricula", nullable = false)
	private String matricula;

	@Column(name = "nome", length = 100, nullable = false)
	private String nome;
	
	@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)  
    private List<Curso> cursos = new ArrayList<Curso>();    
	
	@Column(name = "cpf", length = 11, nullable = false)
	private String cpf;
	
	@Column(name = "status", length = 50, nullable = true)
	private String status;
	
	@Column(name = "permicao", length = 50, nullable = false)
	private String permicao;
	
	@Column(name="email")
	private String email;
	
	public String getMatricula() {
		return matricula;
	}

	public void setMatricula(String matricula) {
		this.matricula = matricula;
	}

	public List<Curso> getCursos() {
		return cursos;
	}

	public void setCursos(List<Curso> cursos) {
		this.cursos = cursos;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}


	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	

	public String getCpf() {
		return cpf;
	}

	public void setCpf(String cpf) {
		this.cpf = cpf;
	}

	public String getPermicao() {
		return permicao;
	}

	public void setPermicao(String permicao) {
		this.permicao = permicao;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	

}
